package com.perceptivesoftware.licensing.domain.generated;

import java.util.List;
import java.util.ArrayList;
import javax.persistence.GenerationType;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TwUserpriv entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TW_USERPRIV")
public class TwUserpriv implements java.io.Serializable
{

	// Fields    

	private TwUserprivId id;

	private TwUserval twUserval;

	// Constructors

	/** default constructor */
	public TwUserpriv()
	{
		// empty constructor required for Spring
	}

	// Property accessors

	@EmbeddedId
	@AttributeOverrides(
	{ @AttributeOverride(name = "userprivUserCode", column = @Column(name = "USERPRIV_USER_CODE", nullable = false, length = 38)), @AttributeOverride(name = "userprivPrivType", column = @Column(name = "USERPRIV_PRIV_TYPE", nullable = false, scale = 0)), @AttributeOverride(name = "userprivPrivAction", column = @Column(name = "USERPRIV_PRIV_ACTION", nullable = false, scale = 0)), @AttributeOverride(name = "userprivItemCode", column = @Column(name = "USERPRIV_ITEM_CODE", nullable = false, length = 38)) })
	public TwUserprivId getId()
	{
		return this.id;
	}

	public void setId(TwUserprivId id)
	{
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USERPRIV_USER_CODE", nullable = false, insertable = false, updatable = false)
	public TwUserval getTwUserval()
	{
		return this.twUserval;
	}

	public void setTwUserval(TwUserval twUserval)
	{
		this.twUserval = twUserval;
	}

}